/*
 *  对象存储 流控制 API接口
 * :
 * @version: 1.0
 * @Autor: lakeside hubin_yuan.410@hotmail.com
 * @date: 20120-05-05
 * @LastEditors:
 * @LastEditTime:
*/

import {_axios,} from '@/plugins/axios'

let apiPrefix = '/oss/stream'

/**
 * 请求URL
 */
export const const_url = Object.freeze({
  upload: apiPrefix + '/upload',
  preView: apiPrefix + '/preView',
  preThumb: apiPrefix + '/preThumb',
  download: apiPrefix + '/download',
})

/**
 * 文件上传
 */
export async function upload(formData, config) {
  return await _axios.post(const_url.upload, formData, config)
}
